<include file="Public:header" />

<script src="__ROOT__/Public/js/kindeditor/kindeditor.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  // 在这里写你的代码...
	$("#select_all").click(
		function(){
			
			if(this.checked){
				$("input[name='row[]']").each(function(){
					this.checked = true;
				});
			}
			else{
				$("input[name='row[]']").each(function(){
					this.checked = false;
				});
			}
		}
		 	
	);
}); 

function chk(){
	oper = $('input[name=oper]:checked').val();
	if(oper == "none"){
		alert("请选择操作!");		
	}
	else if(oper == "bull_del"){
		len = $("input[name='row[]']:checked").size();
		if(len){
			$("#form1").attr('action','__URL__/'+oper);
			return true;
		}
		else{
			alert ("请选择要删除的公告!");
		}
	}
	
	return false;
	
}
</script>

<body>
<include file="Public:channel" />
<include file="Guild:g_menu" />
<br /><br />
<include file="Bulletin:b_menu" />
<br /><br />
<form id="form1" name="form1" onsubmit="return chk()" method="post" action="">
	<input type="submit" name="bull_sub" value="提交">
	<input type="checkbox" name="select_all" id="select_all" >全选
	<input type="radio" name="oper" checked value="none">不操作
	<input type="radio" name="oper" value="bull_del">删除
	<table width="600" border="1" cellpadding="0" cellspacing="0">
	  <tr>
	    <td colspan="6"><div align="center">公告</div></td>
	  </tr>
	   <tr>
	    <td ><div align="center">序号</div></td>
	    <td ><div align="center">选择</div></td>
	    <td ><div align="center">标题</div></td>
	    <td ><div align="center">发布人</div></td>
	    <td ><div align="center">发布时间</div></td>
	    <td ><div align="center">操作</div></td>
	  </tr>
	  <volist name='b_arr' id='two' key='k'>
			  <tr>
			    <td><div align="center">{$k}</div></td>
			    <td><div align="center"><input type="checkbox" name="row[]" value="{$two.id}"></div></td>
			    <td><div align="left"><a href="__URL__/bull_show/bid/{$two.id}">{$two.title}</a></div></td>
			    <td><div align="center">{$two.author}</a></div></td>
			    <td><div align="center">{$two.time|date='Y-m-d H:i:s',###}</div></td>
			    <td><div align="center"><a href="__URL__/bull_edit/bid/{$two.id}">修改</a></div></td>
			  </tr>
	  </volist>		 
	</table>
</form>
<br /><br /><br />
{$page}
<br /><br /><br />
<include file="Public:footer" />
 